//
//  Tools.m
//  YouMin_iOS
//
//  Created by lanou3g on 15/12/11.
//  Copyright © 2015年 wey. All rights reserved.
//

#import "Tools.h"

@implementation Tools

//
//
+(void)hideAction:(UITapGestureRecognizer *)sender {

    MBProgressHUD *hud = (MBProgressHUD *)sender.view;
    [hud hide:YES];
    
}

+ (MBProgressHUD *)creatHUD:(UIView *)view {

    MBProgressHUD *hud =[[MBProgressHUD alloc]initWithView:view];
    hud.detailsLabelColor = [UIColor whiteColor];
    hud.detailsLabelFont = [UIFont systemFontOfSize:16 weight:16];
    [hud show:YES];
    [view addSubview:hud];
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(hideAction:)];
    [hud addGestureRecognizer:tap];
    return hud;
    
}


@end
